natmap: update to 20250924
authorRay Wang <[email protected]>
Sat, 23 Aug 2025 03:33:16 +0000 (11:33 +0800)
committerHannu Nyman <[email protected]>
Sat, 27 Sep 2025 05:22:16 +0000 (08:22 +0300)
Upstream changelog:
https://github.com/heiher/natmap/releases/tag/20250924

Signed-off-by: Ray Wang <[email protected]>
net/natmap/Makefile
net/natmap/files/natmap.config
net/natmap/files/natmap.init

index d389a58763008ba234a36ed06312dbcd2778538b..aca43d3d0ab0602da0cea009ca18b77750dca97c 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=natmap
-PKG_VERSION:=20250721
+PKG_VERSION:=20250924
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/heiher/natmap/releases/download/$(PKG_VERSION)
-PKG_HASH:=25d3288c1654191b7884d6c83b8f669ce788fbab95ebe26d84b65c63ceaa3094
+PKG_HASH:=a86caa74266b62707bdcb9eef34910571061c206a5cd2d1eff694eae25ab5aaf
 
 PKG_MAINTAINER:=Richard Yu <[email protected]>, Ray Wang <[email protected]>
 PKG_LICENSE:=MIT
index c003fc59de8841875293a9c3961afe3a6e9258af..a8d9f6d705e360cd106ed3a1147997d1df6f8986 100644 (file)
@@ -4,11 +4,15 @@ config natmap
        option udp_mode '1'
        option interface ''
        option interval ''
+       option stun_cycle ''
        option stun_server 'stunserver.stunprotocol.org'
        option http_server 'example.com'
+       option fwmark ''
        option port '8080'
        option forward_target ''
        option forward_port ''
+       option forward_timeout ''
+       option forward_congestion ''
        option notify_script ''
        option log_stdout '1'
        option log_stderr '1'
index d0851ab6841b6cc316faf7620e1d790f4e370d3c..f43707f85cfffb317df78ab6ab9867fe6541e312 100644 (file)
@@ -21,12 +21,17 @@ validate_section_natmap() {
                'family:string' \
                'udp_mode:bool:0' \
                'interface:string' \
-               'interval:uinteger' \
-               'stun_server:host' \
-               'http_server:host' \
+               'interval:and(uinteger, min(1))' \
+               'stun_cycle:uinteger' \
+               'stun_server:string' \
+               'http_server:string' \
+               'fwmark:string' \
                'port:or(port,portrange)' \
+               'port_random:bool:0' \
                'forward_target:host' \
                'forward_port:port' \
+               'forward_timeout:and(uinteger, min(1))' \
+               'forward_congestion:string' \
                'notify_script:file' \
                'log_stdout:bool:1' \
                'log_stderr:bool:1'
@@ -43,9 +48,11 @@ natmap_instance() {
        procd_open_instance "$1"
        procd_set_param command "$PROG" \
                ${interval:+-k "$interval"} \
+               ${stun_cycle:+-c "$stun_cycle"} \
                ${stun_server:+-s "$stun_server"} \
                ${http_server:+-h "$http_server"} \
-               ${port:+-b "$port"} \
+               ${fwmark:+-f "$fwmark"} \
+               ${port:+-b "$([ "$port_random" = 1 ] && echo ${port/-/\~} || echo $port)"} \
 
        [ "${family}" = ipv4 ] && procd_append_param command -4
        [ "${family}" = ipv6 ] && procd_append_param command -6
@@ -60,6 +67,8 @@ natmap_instance() {
        }
 
        [ -n "${forward_target}" ] && procd_append_param command -t "$forward_target" -p "$forward_port"
+       [ -n "${forward_timeout}" ] && procd_append_param command -T "$forward_timeout"
+       [ -n "${forward_congestion}" ] && procd_append_param command -C "$forward_congestion"
 
        [ -n "${notify_script}" ] && procd_set_param env "NOTIFY_SCRIPT=${notify_script}"
        procd_append_param command -e /usr/lib/natmap/update.sh